<script type="text/javascript" src="module/mod_ppk/js/kabupaten.js"></script>

<div id=tiga_ba>
	<div id=tiga_baa>Tambah PPK</div>
	<div id=tiga_bab></div>
	<div class=clear></div>
</div>
            
<form action="utama.php?module=mod_ppk&act=simpan" onsubmit="return gsValidate('kode|nama|jenis|alamat','Kode PPK Harus Diisi|Nama PPK Harus Diisi|Jenis PPK Harus Dipilih|Alamat PPK Harus Diisi','required|required|required|required');" method="post" enctype="multipart/form-data">
	<table style="margin: 10px 15px 10px 15px;">
		<tr>
			<td>Kode PPK</td>
			<td>&nbsp;</td>
			<td>
				<input name="kode" type="text" class="input2" id="kode" maxlength="50"/>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Nama PPK</td>
			<td>&nbsp;</td>
			<td>
				<input name="nama" type="text" class="input2" id="nama" maxlength="50"/>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Jenis PPK</td>
			<td>&nbsp;</td>
			<td>
				<select name="jenis" class="input2">
					<option value=""> - - Pilih Jenis PPK - - </option>
					<?php
						$jenis = mysql_query("select * from jenis_ppk");
						while($j=mysql_fetch_array($jenis)){
							echo "<option value=$j[id_jenis]>$j[jenis]</option>";
						}
					?>
				</select>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Alamat</td>
			<td>&nbsp;</td>
			<td>
				<input name="alamat" type="text" class="input" id="alamat" maxlength="255"/>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Provinsi</td>
			<td>&nbsp;</td>
			<td>
				<select name="provinsi" id="provinsi" class="input2">
					<option value=""> - - Pilih Provinsi - - </option>
					<?php
						$provinsi = mysql_query("select * from propinsi where aktif = 'Y' order by propinsi");
						while($p = mysql_fetch_array($provinsi)){
							if($p['id_propinsi']=='64'){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$p[id_propinsi]' $s>$p[propinsi]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Kabupaten</td>
			<td>&nbsp;</td>
			<td>
				<select name="kabupaten" id="kabupaten" class="input2">
					<option value=""> - - Pilih Kabupaten - - </option>
					<?php
						$kabupaten = mysql_query("select * from kabupaten k inner join propinsi p on k.id_propinsi = p.id_propinsi where k.id_propinsi=64 and k.aktif = 'Y' and p.aktif = 'Y' order by kabupaten");
						while($k = mysql_fetch_array($kabupaten)){
							if($k['id_kabupaten']=='6405'){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$k[id_kabupaten]' $s>$k[kabupaten]</option>";
						}
					?>
				</select>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Kelas</td>
			<td>&nbsp;</td>
			<td>
				<?php buat_kombo("kelas","kelas","input2","id_kelas") ?>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Kelas Tarif</td>
			<td>&nbsp;</td>
			<td>
				<?php buat_kombo("kelas_tarif","kelas_tarif","input2","id_kelas_tarif") ?>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Direktur</td>
			<td>&nbsp;</td>
			<td>
				<input name="direktur" type="text" class="input2" id="direktur" maxlength="50"/>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" class="button" value="Simpan" /></td>
		</tr>
	</table>
</form>		
            
        